package com.wangijun.yuan.core.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 用户登录信息
 */
@Schema(description = "用户登录信息")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "user_auth")
public class UserAuth implements Serializable {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "")
    private Long id;

    @TableField(value = "user_id")
    @Schema(description = "")
    private Long userId;

    /**
     * 密码
     */
    @TableField(value = "passwd")
    @Schema(description = "密码")
    private String passwd;

    /**
     * 最后登录时间
     */
    @TableField(value = "last_login_time")
    @Schema(description = "最后登录时间")
    private LocalDateTime lastLoginTime;

    /**
     * 盐值
     */
    @TableField(value = "salt")
    @Schema(description = "盐值")
    private String salt;
    @Serial
    private static final long serialVersionUID = 1L;
}